﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Text.RegularExpressions;

namespace ExameRegister
{
    public class Validator
    {
        /// <summary>
        /// 验证是否为手机号码
        /// </summary>
        /// <param name="strIn"></param>
        /// <returns></returns>
        public static bool IsValidMobTel(string strIn)
        {
            if (string.IsNullOrEmpty(strIn)) return false;
            return Regex.IsMatch(strIn, @"^((\(\d{3}\))|(\d{3}\-))?13\d{9}|15[89]\d{8}$");
        }
    }
}
